home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK1.toast / Development Kits (Disc 1) / Apple Game Sprockets / InputSprocket 1.0.1 / InputSprocket.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-12  |  18.0 KB  |  740 lines  |  [TEXT/CWIE]

  1. /*
  2.  *    File:            InputSprocket.h
  3.  *
  4.  *    Version:        Apple Game Sprockets 1.0
  5.  *
  6.  *    Dependencies:    Universal Interfaces 2.1.2 on ETO #20
  7.  *
  8.  *    Contents:        Public interfaces for InputSprocket.
  9.  *
  10.  *    Bugs:            If you find a problem with this file or InputSprocketLib,
  11.  *                    please send e-mail describing the problem in enough detail
  12.  *                    to be reproduced, and include the version number above, the
  13.  *                    version of MacOS and hardware configuration information to
  14.  *                    sprockets@adr.apple.com.
  15.  *
  16.  *    Copyright (c) 1996 Apple Computer, Inc.  All rights reserved.
  17.  */
  18.  
  19. #ifndef __INPUTSPROCKET__
  20. #define __INPUTSPROCKET__
  21.  
  22.  
  23. #ifndef __TYPES__
  24. #include <Types.h>
  25. #endif
  26. /*    #include <ConditionalMacros.h>                                */
  27.  
  28. #ifndef __EVENTS__
  29. #include <Events.h>
  30. #endif
  31.  
  32.  
  33. #if GENERATINGPOWERPC
  34.  
  35. #ifdef __cplusplus
  36. extern "C" {
  37. #endif
  38.  
  39. #if PRAGMA_ALIGN_SUPPORTED
  40. #pragma options align=power
  41. #endif
  42.  
  43. /****** YOU NEED THESE LINES IF YOU DON'T HAVE THE LATEST TYPES.h
  44.  
  45. struct UnsignedWide {
  46.     UInt32                            hi;
  47.     UInt32                            lo;
  48. };
  49.  
  50. typedef UnsignedWide AbsoluteTime;
  51.  
  52. */
  53.  
  54. /* ********************* data types ********************* */
  55. typedef struct ISpDevicePrivate *ISpDeviceReference;
  56. typedef struct ISpElementPrivate *ISpElementReference;
  57. typedef struct ISpElementListPrivate *ISpElementListReference;
  58. typedef OSType ISpDeviceClass;  /* general classs of device, example : keyboard, mouse, joystick */
  59. typedef OSType ISpDeviceIdentifier;   /* a specific device,  example: standard 1-button mouse, 105key ext. kbd. */
  60. typedef OSType ISpElementLabel;
  61. typedef OSType ISpElementKind;
  62.  
  63. /* *************** errors -30420 to -30439***************** */
  64.  
  65. enum
  66. {
  67.     kISpInternalErr = -30420,
  68.     kISpSystemListErr = -30421,
  69.     kISpBufferToSmallErr = -30422,
  70.     kISpElementInListErr = -30423,
  71.     kISpElementNotInListErr = - 30424,
  72.     kISpSystemInactiveErr = -30425,
  73.     kISpDeviceInactiveErr = -30426,
  74.     kISpSystemActiveErr = -30427,
  75.     kISpDeviceActiveErr = -30428,
  76.     kISpListBusyErr = -30429
  77. };
  78.  
  79. /* *************** resources **************** */
  80.  
  81. enum 
  82. {
  83.     kISpSetListResourceType = 'setl',
  84.     kISpSetDataResourceType = 'setd'
  85. };
  86.  
  87. /*
  88.  * ISpDeviceDefinition
  89.  *
  90.  * This structure provides all the available
  91.  * information for an input device within the system
  92.  *
  93.  */
  94.  
  95. typedef struct ISpDeviceDefinition
  96. {
  97.     Str63 deviceName;                /* a human readable name of the device */
  98.     ISpDeviceClass theDeviceClass;        /* general classs of device example : keyboard, mouse, joystick */
  99.     ISpDeviceIdentifier theDeviceIdentifier;        /* every distinguishable device should have an OSType */
  100.     UInt32 permanentID;            /* a cross reboot id unique within that deviceType, 0 if not possible */
  101.     UInt32 flags;                /* some status flags */
  102.     UInt32 reserved1;
  103.     UInt32 reserved2;
  104.     UInt32 reserved3;
  105. } ISpDeviceDefinition;
  106.  
  107. enum
  108. {
  109.     kISpDeviceFlag_HandleOwnEmulation = 1
  110. };
  111.  
  112. /*
  113.  * ISpElementEvent, ISpElementEventPtr
  114.  *
  115.  * This is the structure that event data is passed in.
  116.  *
  117.  */
  118.  
  119. typedef struct ISpElementEvent
  120. {
  121.     AbsoluteTime when;                  /* this is absolute time on PCI or later, otherwise it is */
  122.                                         /* 0 for the hi 32 bits and TickCount for the low 32 bits */
  123.     ISpElementReference element;        /* a reference to the element that generated this event */
  124.     UInt32 refCon;                        /* for application usage, 0 on the global list */
  125.     UInt32 data;                        /* the data for this event */
  126. } ISpElementEvent, *ISpElementEventPtr;
  127.  
  128. /*
  129.  * ISpElementInfo, ISpElementInfoPtr
  130.  *
  131.  * This is the generic definition of an element.
  132.  * Every element must contain this information.
  133.  *
  134.  */
  135. typedef struct ISpElementInfo
  136. {
  137.     ISpElementLabel theLabel;
  138.     ISpElementKind theKind;
  139.     Str63 theString;
  140.     UInt32 reserved1;
  141.     UInt32 reserved2;
  142. } ISpElementInfo, *ISpElementInfoPtr;
  143.  
  144. typedef struct ISpNeed
  145. {
  146.     Str63 name;
  147.     short iconSuiteResourceId;    /* resource id of the icon suite */
  148.     short reserved;
  149.     ISpElementKind theKind;
  150.     ISpElementLabel theLabel;
  151.     UInt32 flags;
  152.     UInt32 reserved1;
  153.     UInt32 reserved2;
  154.     UInt32 reserved3;
  155. } ISpNeed;
  156.  
  157. typedef UInt32 ISpNeedFlagBits;
  158. enum
  159. {
  160.     kISpNeedFlag_NoMultiConfig = 1
  161. };
  162.  
  163. /*
  164.  *
  165.  * These are the current built values for ISpDeviceClass
  166.  *
  167.  */
  168.  
  169. enum
  170. {
  171.     kISpDeviceClass_SpeechRecognition = 'talk',
  172.     kISpDeviceClass_Mouse = 'mous',
  173.     kISpDeviceClass_Keyboard = 'keyd',
  174.     kISpDeviceClass_Joystick = 'joys',
  175.     kISpDeviceClass_Wheel = 'whel',
  176.     kISpDeviceClass_Pedals = 'pedl',
  177.     kISpDeviceClass_Levers = 'levr'
  178. };
  179.  
  180. /*
  181.  * These are the current built in ISpElementKind's
  182.  * 
  183.  * These are all OSTypes.
  184.  *
  185.  */
  186.  
  187. enum
  188. {
  189.     kISpElementKind_Button = 'butn',
  190.     kISpElementKind_DPad = 'dpad',
  191.     kISpElementKind_Axis = 'axis',
  192.     kISpElementKind_Movement = 'move',
  193.     kISpElementKind_Virtual = 'virt'
  194. };
  195.  
  196.  
  197. /*
  198.  *
  199.  * These are the current built in ISpElementLabel's
  200.  *
  201.  * These are all OSTypes.
  202.  *
  203.  */
  204.  
  205. enum
  206. {
  207.     /* generic */
  208.     kISpElementLabel_None = 'none',
  209.     
  210.     /* axis */
  211.     kISpElementLabel_XAxis = 'xaxi',
  212.     kISpElementLabel_YAxis = 'yaxi',
  213.     kISpElementLabel_ZAxis = 'zaxi',
  214.     
  215.     kISpElementLabel_Rx = 'rxax',
  216.     kISpElementLabel_Ry = 'ryax',
  217.     kISpElementLabel_Rz = 'rzax',
  218.     
  219.     kISpElementLabel_Gas = 'gasp',
  220.     kISpElementLabel_Brake = 'brak',
  221.     kISpElementLabel_Clutch = 'cltc',
  222.     
  223.     kISpElementLabel_Throttle = 'thrt',
  224.     kISpElementLabel_Trim = 'trim',
  225.     
  226.     /* direction pad */
  227.     kISpElementLabel_POVHat = 'povh',
  228.     kISpElementLabel_PadMove = 'move',
  229.     
  230.     /* buttons */
  231.     kISpElementLabel_Fire = 'fire',
  232.     kISpElementLabel_Start = 'strt',
  233.     kISpElementLabel_Select = 'optn'
  234. };
  235.  
  236. /*
  237.  *
  238.  * direction pad data & configuration information
  239.  *
  240.  */
  241.  
  242. typedef UInt32 ISpDPadData;
  243. enum
  244. {
  245.     kISpPadIdle = 0,
  246.     kISpPadLeft,
  247.     kISpPadUpLeft,
  248.     kISpPadUp,
  249.     kISpPadUpRight,
  250.     kISpPadRight,
  251.     kISpPadDownRight,
  252.     kISpPadDown,
  253.     kISpPadDownLeft
  254. };
  255.  
  256. typedef struct ISpDPadConfigurationInfo
  257. {
  258.     UInt32 id;                /* ordering 1..n, 0 = no relavent ordering of direction pads */
  259.     Boolean fourWayPad;        /* true if this pad can only produce idle + four directions */
  260. } ISpDPadConfigurationInfo;
  261.  
  262. /*
  263.  *
  264.  * button data & configuration information
  265.  *
  266.  */
  267.  
  268. typedef UInt32 ISpButtonData;
  269. enum
  270. {
  271.     kISpButtonUp = 0,
  272.     kISpButtonDown = 1
  273. };
  274.  
  275. typedef struct ISpButtonConfigurationInfo
  276. {
  277.     UInt32 id;                /* ordering 1..n, 0 = no relavent ordering of buttons */
  278. } ISpButtonConfigurationInfo;
  279.  
  280. /*
  281.  *
  282.  * axis data & configuration information 
  283.  *
  284.  */
  285.  
  286. #define    kISpAxisMinimum  0x00000000U
  287. #define    kISpAxisMiddle   0x7FFFFFFFU
  288. #define    kISpAxisMaximum  0xFFFFFFFFU
  289.  
  290. typedef struct ISpAxisConfigurationInfo
  291. {
  292.     Boolean    symetricAxis;    /* axis is symetric, i.e. meaningful 0ish idle at the kISpAxisMiddle position */
  293. } ISpAxisConfigurationInfo;
  294.  
  295.  
  296. typedef struct ISpMovementData
  297. {
  298.     UInt32 xAxis;
  299.     UInt32 yAxis;
  300.     UInt32 direction;    /* ISpDPadData version of the movement */
  301. } ISpMovementData;
  302.  
  303. enum
  304. {
  305.     kISpVirtualElementFlag_UseTempMem = 1
  306. };
  307.  
  308. enum
  309. {
  310.     kISpElementListFlag_UseTempMem = 1
  311. };
  312.  
  313. enum
  314. {
  315.     kISpFirstIconSuite = 30000,
  316.     kISpLastIconSuite = 30100,
  317.     kISpNoneIconSuite = 30000
  318. };
  319.  
  320. /* ********************* user level functions ********************* */
  321.  
  322. /********** user interface functions **********/
  323.  
  324.  
  325. NumVersion ISpGetVersion(void);
  326.  
  327. /*
  328.  *
  329.  * ISpElement_NewVirtual(ISpElementReference *outElement);
  330.  *
  331.  */
  332.  
  333. OSStatus ISpElement_NewVirtual(UInt32 dataSize, ISpElementReference *outElement, UInt32 flags);
  334.  
  335. /*
  336.  *
  337.  * ISpElement_NewVirtualFromNeeds(UInt32 count, ISpNeeds *needs, ISpElementReference *outElements);
  338.  *
  339.  */
  340.  
  341. OSStatus ISpElement_NewVirtualFromNeeds(UInt32 count, ISpNeed *needs, ISpElementReference *outElements, UInt32 flags);
  342.  
  343. /*
  344.  *
  345.  * ISpElement_DisposeVirtual(inElement);
  346.  *
  347.  */
  348.  
  349. OSStatus ISpElement_DisposeVirtual(UInt32 count, ISpElementReference *inElements);
  350.  
  351. /*
  352.  * ISpInit
  353.  *
  354.  */
  355.  
  356. OSStatus ISpInit(
  357.     UInt32 count,
  358.     ISpNeed *needs,
  359.     ISpElementReference *inReferences,
  360.     OSType appCreatorCode,
  361.     OSType subCreatorCode,
  362.     UInt32 flags,
  363.     short setListResourceId, 
  364.     UInt32 version);
  365.     
  366.     
  367. /*
  368.  * ISpConfigure
  369.  *
  370.  */
  371.  
  372. typedef Boolean (*ISpEventProcPtr) (EventRecord* inEvent);
  373.  
  374. OSStatus ISpConfigure(ISpEventProcPtr inEventProcPtr);
  375.  
  376. /*
  377.  *
  378.  * ISpStop
  379.  *
  380.  */
  381.  
  382. OSStatus ISpStop(void);
  383.  
  384. /*
  385.  *
  386.  * ISpSuspend, ISpResume
  387.  *
  388.  */
  389.  
  390. OSStatus ISpSuspend(void);
  391. OSStatus ISpResume(void);
  392.  
  393. /*
  394.  * DevicesExtract
  395.  *
  396.  * DevicesExract will extract as many of the devices from a system wide list as possible.  You pass
  397.  * ina pointer to an array of device references and the size of that array in units of sizeof(ISpDeviceReference)
  398.  * It will return how many device references are in the system wide list in the outCount parameter and 
  399.  * it will copy the minimum of that number and the size of the inBufferCount parameter (how big your array was).
  400.  *
  401.  * ByClass and ByIdentifier are the same except that they will only count and copy device references to devices
  402.  * of the specified class or identifier.
  403.  *
  404.  * Return Codes
  405.  * paramErr
  406.  *
  407.  */
  408.  
  409. OSStatus ISpDevices_Extract(UInt32 inBufferCount, UInt32 *outCount, ISpDeviceReference *buffer);
  410. OSStatus ISpDevices_ExtractByClass(ISpDeviceClass theClass, UInt32 inBufferCount, UInt32 *outCount, ISpDeviceReference *buffer);
  411. OSStatus ISpDevices_ExtractByIdentifier(ISpDeviceIdentifier theIdentifier, UInt32 inBufferCount, UInt32 *outCount, ISpDeviceReference *buffer);
  412.  
  413.  
  414. /*
  415.  * DeactivateDevices, ActivateDevices
  416.  *
  417.  * All devices in the sytem start out activate but if for some reason you don't want to get events
  418.  * from some devices then you can use these class to turn on and off getting those events.  The 
  419.  * most likely case is if you would want to get input from the keyboard or mouse as cursor/text style
  420.  * data.
  421.  *
  422.  * Return Codes
  423.  * paramErr
  424.  *
  425.  */
  426.  
  427. OSStatus ISpDevices_Activate(UInt32 inDeviceCount, ISpDeviceReference *inDevicesToActivate);
  428. OSStatus ISpDevices_Deactivate(UInt32 inDeviceCount, ISpDeviceReference *inDevicesToDeactivate);
  429. OSStatus ISpDevice_IsActive(ISpDeviceReference inDevice, Boolean *outIsActive);
  430.  
  431. /*
  432.  * ISpDevice_GetDefinition
  433.  *
  434.  * pass in the device reference, sizeof(ISpDeviceDefinition) and this will 
  435.  * return the device definition struct for that device into the buffer pointed to 
  436.  * by outStruct
  437.  *
  438.  * Return Codes
  439.  * paramErr
  440.  *
  441.  */
  442.  
  443. OSStatus ISpDevice_GetDefinition(const ISpDeviceReference inDevice, UInt32 buflen, ISpDeviceDefinition *outStruct);
  444.  
  445.  
  446. /*
  447.  *
  448.  * ISpDevice_GetElementList
  449.  *
  450.  * pass in the device reference and this will return the element list for that device
  451.  * you are prohibited from modifiying this element list 
  452.  *
  453.  * Return Codes
  454.  * paramErr
  455.  *
  456.  */
  457.  
  458. OSStatus ISpDevice_GetElementList(const ISpDeviceReference inDevice, ISpElementListReference *outElementList);
  459.  
  460. /*
  461.  *
  462.  * takes an ISpElementReference and returns the group that it is in or 0 if there is
  463.  * no group
  464.  *
  465.  * Return Codes
  466.  * paramErr if inElement is 0
  467.  *
  468.  */
  469.  
  470. OSStatus ISpElement_GetGroup(const ISpElementReference inElement, UInt32 *outGroup);
  471.  
  472. /*
  473.  *
  474.  * takes an ISpElementReference and returns the device that the element belongs 
  475.  * to.
  476.  *
  477.  * Return Codes
  478.  * paramErr if inElement is 0 or outDevice is nil
  479.  *
  480.  */
  481.  
  482. OSStatus ISpElement_GetDevice(const ISpElementReference inElement, ISpDeviceReference *outDevice);
  483.         
  484. /*
  485.  *
  486.  * takes an ISpElementReference and gives the ISpElementInfo for that Element.  This is the
  487.  * the set of standard information.  You get ISpElementKind specific information
  488.  * through ISpElement_GetConfigurationInfo.
  489.  *
  490.  * Return Codes
  491.  * paramErr if inElement is 0 or outInfo is nil
  492.  *
  493.  */
  494.  
  495. OSStatus ISpElement_GetInfo(const ISpElementReference inElement, ISpElementInfoPtr outInfo);
  496.         
  497. /*
  498.  *
  499.  *         
  500.  *
  501.  * takes an ISpElementReference and gives the ISpElementKind specific configuration information
  502.  * 
  503.  * if buflen is not long enough to hold the information ISpElement_GetConfigurationInfo will
  504.  * copy buflen bytes of the data into the block of memory pointed to by configInfo and
  505.  * will return something error.
  506.  *
  507.  * Return Codes
  508.  * paramErr if inElement or configInfo is nil
  509.  * something error if buflen is not long enough to hold the information
  510.  *
  511.  */
  512.  
  513. OSStatus ISpElement_GetConfigurationInfo(const ISpElementReference inElement, UInt32 buflen, void *configInfo);
  514.     
  515. /*
  516.  *
  517.  * ISpElement_GetSimpleState
  518.  *
  519.  * Takes an ISpElementReference and returns the current state of that element.  This is a 
  520.  * specialized version of ISpElement_GetComplexState that is only appropriate for elements
  521.  * whose data fits in a signed 32 bit integer.
  522.  *
  523.  *
  524.  *
  525.  * Return Codes
  526.  * paramErr if inElement is 0 or state is nil
  527.  * err1 if the elements data does not fit in a signed 32 bit integer
  528.  *
  529.  */
  530.  
  531. OSStatus ISpElement_GetSimpleState(const ISpElementReference inElement, UInt32 *state);
  532.  
  533. /*
  534.  *
  535.  * ISpElement_GetComplexState
  536.  *
  537.  * Takes an ISpElementReference and returns the current state of that element.  
  538.  * Will copy up to buflen bytes of the current state of the device into
  539.  * state.
  540.  *
  541.  *
  542.  * Return Codes
  543.  * paramErr if inElement is 0 or state is nil
  544.  * err2 if buflen is not large enough to hold all the data
  545.  *
  546.  */
  547.  
  548. OSStatus ISpElement_GetComplexState(const ISpElementReference inElement, UInt32 buflen, void *state);
  549.  
  550.  
  551. /*
  552.  * ISpElement_GetNextEvent
  553.  *
  554.  * changed 3/14/96
  555.  *
  556.  * It takes in an element  reference and the buffer size of the ISpElementEventPtr
  557.  * it will set wasEvent to true if there was an event and false otherwise.  If there
  558.  * was not enough space to fill in the whole event structure that event will be
  559.  * dequed, as much of the event as will fit in the buffer will by copied and
  560.  * ISpElement_GetNextEvent will return an error.
  561.  *
  562.  * Return Codes
  563.  * paramErr
  564.  * somethingErr - buffer to small
  565.  */
  566.  
  567. OSStatus ISpElement_GetNextEvent(ISpElementReference inElement, UInt32 bufSize, ISpElementEventPtr event, Boolean *wasEvent);
  568.  
  569. /*
  570.  *
  571.  * ISpElement_Flush
  572.  *
  573.  * It takes an ISpElementReference and flushes all the events on that element.  All it guaruntees is
  574.  * that any events that made it to this layer before the time of the flush call will be flushed and
  575.  * it will not flush any events that make it to this layer after the time when the call has returned.
  576.  * What happens to events that occur during the flush is undefined.
  577.  *
  578.  *
  579.  * Return Codes
  580.  * paramErr
  581.  *
  582.  */
  583.  
  584. OSStatus ISpElement_Flush(ISpElementReference inElement);
  585.  
  586.  
  587.  
  588. /*
  589.  * ISpElementList_New
  590.  *
  591.  * Creates a new element list and returns it in outElementList.  In count specifies 
  592.  * the number of element references in the list pointed to by inElements.  If inCount
  593.  * is non zero the list is created with inCount elements in at as specified by the 
  594.  * inElements parameter.  Otherwise the list is created empty.
  595.  *
  596.  *
  597.  * Return Codes
  598.  * out of memory - If it failed to allocate the list because it was out of memory
  599.                    it will also set outElementList to 0
  600.  * paramErr if outElementList was nil
  601.  *
  602.  *
  603.  * Special Concerns
  604.  *
  605.  * interrupt unsafe
  606.  *
  607.  */
  608.  
  609. OSStatus ISpElementList_New(UInt32 inCount, ISpElementReference *inElements, ISpElementListReference *outElementList, UInt32 flags);
  610.  
  611. /*
  612.  * ISpElementList_Dispose
  613.  *
  614.  * Deletes an already existing memory list.  
  615.  *
  616.  *
  617.  * Return Codes
  618.  * paramErr if inElementList was 0
  619.  *
  620.  *
  621.  * Special Concerns
  622.  *
  623.  * interrupt unsafe
  624.  *
  625.  */
  626.  
  627. OSStatus ISpElementList_Dispose(ISpElementListReference inElementList);
  628.  
  629. /*
  630.  * ISpGetGlobalElementList
  631.  *
  632.  * returns the global element list
  633.  *
  634.  * Return Codes
  635.  * paramErr if outElementList is nil
  636.  *
  637.  */ 
  638.  
  639. OSStatus ISpGetGlobalElementList(ISpElementListReference *outElementList);
  640.  
  641. /*
  642.  * ISpElementList_AddElement
  643.  *
  644.  * adds an element to the element list
  645.  *
  646.  * Return Codes
  647.  * paramErr if inElementList is 0 or newElement is 0
  648.  * memory error if the system is unable to allocate enough memory
  649.  *
  650.  * Special Concerns
  651.  * interrupt Unsafe
  652.  * 
  653.  */
  654. OSStatus ISpElementList_AddElements(ISpElementListReference inElementList, UInt32 refCon, UInt32 count, ISpElementReference *newElements);
  655.  
  656. /*
  657.  * ISpElementList_RemoveElement
  658.  *
  659.  * removes the specified element from the element list
  660.  *
  661.  * Return Codes
  662.  * paramErr if inElementList is 0 or oldElement is 0
  663.  * memory error if the system is unable to allocate enough memory
  664.  *
  665.  * Special Concerns
  666.  * interrupt Unsafe
  667.  * 
  668.  */
  669.  
  670. OSStatus ISpElementList_RemoveElements(ISpElementListReference inElementList, UInt32 count, ISpElementReference *oldElement);
  671.  
  672. /*
  673.  * ISpElementList_Extract
  674.  *
  675.  * ISpElementList_Extract will extract as many of the elements from an element list as possible.  You pass
  676.  * in an element list, a pointer to an array of element references and the number of elements in that array.
  677.  * It will return how many items are in the element list in the outCount parameter and copy the minimum of 
  678.  * that number and the size of the array into the buffer.
  679.  *
  680.  * ByKind and ByLabel are the same except that they will only count and copy element references to elements
  681.  * that have the specified kind and label.
  682.  *
  683.  * Return Codes
  684.  * paramErr
  685.  *
  686.  */
  687.  
  688. OSStatus ISpElementList_Extract(ISpElementListReference inElementList, UInt32 inBufferCount, UInt32 *outCount, ISpElementReference *buffer);
  689. OSStatus ISpElementList_ExtractByKind(ISpElementListReference inElementList, ISpElementKind theKind, UInt32 inBufferCount, UInt32 *outCount, ISpElementReference *buffer);
  690. OSStatus ISpElementList_ExtractByLabel(ISpElementListReference inElementList, ISpElementLabel theLabel, UInt32 inBufferCount, UInt32 *outCount, ISpElementReference *buffer);
  691.  
  692. /*
  693.  * ISpElementList_GetNextEvent
  694.  *
  695.  * changed 3/14/96
  696.  *
  697.  * It takes in an element list reference and the buffer size of the ISpElementEventPtr
  698.  * it will set wasEvent to true if there was an event and false otherwise.  If there
  699.  * was not enough space to fill in the whole event structure that event will be
  700.  * dequed, as much of the event as will fit in the buffer will by copied and
  701.  * ISpElementList_GetNextEvent will return an error.
  702.  *
  703.  * Return Codes
  704.  * paramErr
  705.  * somethingErr - buffer to small
  706.  */
  707.  
  708. OSStatus ISpElementList_GetNextEvent(ISpElementListReference inElementList, UInt32 bufSize, ISpElementEventPtr event, Boolean *wasEvent);
  709.  
  710. /*
  711.  *
  712.  * ISpElementList_Flush
  713.  *
  714.  * It takes an ISpElementListReference and flushes all the events on that list.  All it guaruntees is
  715.  * that any events that made it to this layer before the time of the flush call will be flushed and
  716.  * it will not flush any events that make it to this layer after the time when the call has returned.
  717.  * What happens to events that occur during the flush is undefined.
  718.  *
  719.  *
  720.  * Return Codes
  721.  * paramErr
  722.  *
  723.  */
  724.  
  725. OSStatus ISpElementList_Flush(ISpElementListReference inElementList);
  726.  
  727.  
  728. #ifdef __cplusplus
  729. }
  730. #endif
  731.  
  732.  
  733.  
  734. #if PRAGMA_ALIGN_SUPPORTED
  735. #pragma options align=reset
  736. #endif
  737.  
  738. #endif /* GENERATINGPOWERPC */
  739. #endif /* __INPUTSPROCKET__ */
  740.